<template>
	<view class="ntop">
		<view class="title">
			<view class="liebiao" :class="{'yinc': num == index}" v-for="(item,index) in list" :key="index">

				<cover-view :style="'padding-top:' + titleHeight + 'px'" class="ntop-text" v-if="num == index">
					<view class="block" @click="goBack">
						<image src="../static/images/fanhui.png" mode="widthFix"></image>
					</view>
					<!-- {{item.text}} -->
进驻城市
				</cover-view>
			</view>


		</view>
	</view>
</template>
<script>
	let menuButtonInfo=uni.getMenuButtonBoundingClientRect()
	console.log(menuButtonInfo)
	export default {
		name: "ntop",
		props: {
			num: String
		},

		data() {
			return {
				titleHeight: menuButtonInfo.top + 5,
				list: [{
					text: '问题答疑',
				}, {
					text: '在线客服',
				}, {
					text: '申请加盟',
				}, {
					text: '进驻城市',
				}]
			}
		},
		onLoad() {

		},
		methods: {
			goBack() {
				uni.switchTab({
				    url: '/pages/zixun/index',
				})
				}
			}
		}
</script>

<style lang="scss">
	.ntop {
		position: relative;
		z-index: 9;
		top: 0;
		text-align: center;
		width: 100%;
		background: #fff;
		overflow: hidden;

		.liebiao {
			display: none;
		}

		.yinc {
			display: block;
		}

		cover-view {
			color: #00943a;
			font-size: 35rpx;
			padding-bottom: 50rpx;
			border-radius: 0 0 50rpx 50rpx;
			background: #fff;
			position: relative;
			width: 100%;
		}


	}

	.block {
		position: absolute;
		left: 30rpx;

		image {
			width: 20rpx;
		}
	}
</style>